<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Drops a database [deprecated]</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="mongoclient.construct.html">« MongoClient::__construct</a></li>
      <li style="float: right;"><a href="mongoclient.get.html">MongoClient::__get »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="class.mongoclient.html">MongoClient</a></li>
    <li>Drops a database [deprecated]</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="mongoclient.dropdb" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">MongoClient::dropDB</h1>
  <p class="verinfo">(PECL mongo &gt;=1.3.0)</p><p class="refpurpose"><span class="refname">MongoClient::dropDB</span> &mdash; <span class="dc-title">Drops a database [deprecated]</span></p>

 </div>

 <div id="mongoclient.dropdb-soft-deprecation-notice" class="soft-deprecation-notice">
  <p class="para">This extension that defines this method
is deprecated. Instead, the <a href="" class="link">MongoDB</a> extension should be used.
There is no equivalent for this method in the new extension, but there is an
alternative in the <a href="" class="link">PHP library</a>:</p>
  <ul class="simplelist">
   <li class="member"><a href="https://docs.mongodb.com/php-library/master/reference/method/MongoDBClient-dropDatabase/" class="link external">&raquo;&nbsp;MongoDB\Client::dropDatabase()</a></li>
  </ul>
 </div>

 <div class="refsect1 description" id="refsect1-mongoclient.dropdb-description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><strong>MongoClient::dropDB</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.declarations.html#language.types.declarations.mixed" class="type mixed">mixed</a></span> <code class="parameter">$db</code></span>): <span class="type">array</span></div>


  <div class="warning"><strong class="warning">Warning</strong>
   <h1 class="title">Deprecated</h1>
   <p class="para">
    Use <span class="function"><a href="mongodb.drop.html" class="function">MongoDB::drop()</a></span> instead.
   </p>
  </div>

 </div>


 <div class="refsect1 parameters" id="refsect1-mongoclient.dropdb-parameters">
  <h3 class="title">Parameters</h3>
  <p class="para">
   <dl>

    
     <dt>

      <code class="parameter">db</code>
     </dt>

     <dd>

      <p class="para">
       The database to drop. Can be a MongoDB object or the name of the database.
      </p>
     </dd>

    
   </dl>

  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-mongoclient.dropdb-returnvalues">
  <h3 class="title">Return Values</h3>
  <p class="para">
   Returns the database response.
  </p>
 </div>

</div></div></div></body></html>